﻿import QtQuick 2.7
import QtQuick.Window 2.0
import QtQuick.Window 2.1
import QtQuick.Controls 2.0
import paintline 1.0
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls 1.4
import QtGraphicalEffects 1.0
    Rectangle{
        width: 1280
        height: 775
        color:"cadetblue";
        //console.log(com.currentText);
        Rectangle{
            id:drawwindow
            width:300
            height:200
            color:"black";
        Draw{
            id:draw
            anchors.fill: parent
            Component.onCompleted: {
                co(true);
                nox(false);
                o2(true);
                particulates(false);
                so2(true);
                //setTimeRange(com.currentText);
                //setTimeRange(17);
                //console.log("Dd");
                setStartTime("2017-12-12 19:22");
                setWindowWidth(drawwindow.width);
                setWindowHeight(drawwindow.height);
                setMaxValue(100);
            }
        }
    }
        Rectangle{
            width: 300
            height: 200
            x:500
            color:"black";
            ComboBox {
                id:com
                editable: false;
                model: 10
                currentIndex:1;
                validator: IntValidator {bottom: 0; top:10;}
            }
        }
        Rectangle{
            width: 300
            height: 200
            x:500
            y:200
            Button{
                text:"123"
                onClicked: {
                    draw.setTimeRange(com.currentText);
                    draw.update();
                    //drawwindow.update();
                }
            }
        }
}
